package com.ty.controller;

import com.ty.bean.ProductInquiry;
import com.ty.common.bean.ResultBean;
import com.ty.common.controller.BaseController;
import com.ty.service.ProductInquiryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "产品询价单")
@RestController
@RequestMapping("/api")
public class ProductInquiryController extends BaseController {

    @Autowired
    ProductInquiryService productInquiryService;

    @ApiOperation("保存")
    @PostMapping("/productInquiry")
    public ResultBean save(@RequestBody ProductInquiry productInquiry){
        return saveResult(productInquiryService.save(productInquiry));
    }
}
